﻿using SocketBook7Server.db;
using SocketBook7Server.Script.net;
using System;
using System.Reflection;

namespace SocketBook7Server
{
    class Program
    {
        static void Main(string[] args)
        {
            //Assembly assembly = Assembly.GetExecutingAssembly(); // 获取当前程序集
            //Type[] typeArr = assembly.GetTypes();
            

            if (!DbManager.Connect("game", "127.0.0.1", 3306, "root", "hz88858&")){
                return; }
            NetManager.StartLoop(8888);
            //MsgMove msgMove = new MsgMove();
            //msgMove.x = 100;
            //msgMove.y = -20;
            ////取得要发送的字符串
            //byte[] bytes = MsgMove.Encode(msgMove);
            ////接收后解码
            //string s = System.Text.Encoding.UTF8.GetString(bytes);
            //Console.WriteLine(s);
            //byte[] bytes1 = System.Text.Encoding.UTF8.GetBytes(s);
            //MsgMove m1 = (MsgMove)MsgMove.Decode1("MsgMove", bytes1, 0, bytes1.Length);
            //Console.WriteLine(m1.x);
            //Console.WriteLine(m1.y);
            //Console.WriteLine(m1.z);
            //MsgMove m = (MsgMove)MsgMove.Decode(bytes,(UInt16)bytes.Length);
            //Console.WriteLine(m.x);
            //Console.WriteLine(m.y);
            //Console.WriteLine(m.z);
        }
    }
}
